import { $t } from "@/plugins/i18n";
const Layout = () => import("@/layout/index.vue");
export default [
  // 登录路由（原有）
  {
    path: "/login",
    name: "Login", // 路由name首字母大写（规范）
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: $t("menus.pureLogin"),
      showLink: false,
      rank: 101
    }
  },
  // 注册路由（新增，合并进来）
  {
    path: "/register",
    name: "Register", // 修正：name首字母大写（符合Vue Router规范）
    component: () => import("@/views/register/index.vue"),
    meta: {
      title: $t("menus.register"),
      showLink: false,
      rank: 102 // 调整rank，避免和登录路由重复
    }
  },
  // 重定向路由（只留一个，删除重复的）
  {
    path: "/redirect",
    component: Layout,
    meta: {
      title: $t("status.pureLoad"),
      showLink: false,
      rank: 103 // 调整rank，确保排序正常
    },
    children: [
      {
        path: "/redirect/:path(.*)",
        name: "Redirect",
        component: () => import("@/layout/redirect.vue")
      }
    ]
  }
] satisfies Array<RouteConfigsTable>;
